package com.jeebey.mybatis.dialect.impl;

import com.jeebey.mybatis.dialect.IDialect;
import com.jeebey.mybatis.utils.SqlParserUtil;

/**
 * @since 1.0
 * @author <a href="mailto:84961426@qq.com">JuST4iT</a>
 * @version $Id: SqlServerDialect.java Feb 18, 2016 6:05:08 PM $
 */

public class SqlServerDialect implements IDialect {
	private static final SqlParserUtil sqlParser = new SqlParserUtil();

	public String createPagingSql(String sql, int offset, int size) {
		return sqlParser.convertToPageSql(sql, offset, size);
	}

	public String createIdentitySql() {
		return "SELECT SCOPE_IDENTITY()";
	}
	
	@Override
	public String createClearCacheSql() {
		return "SELECT 1";
	}
}
